<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/common.css?01_24" />
		<link rel="stylesheet" type="text/css" href="../css/templet.css?01_24" />
		<link rel="stylesheet" type="text/css" href="../fonts/font-awesome.min.css?01_24" />
		<link rel="stylesheet" type="text/css" href="../mui/css/mui.css?01_24" />
		<!--公共js-->
		<script type="text/javascript" src="../common/js/jquery.js?01_24"></script>
		<!--插件-->
		<script type="text/javascript" src="../common/js/vue.min.js?01_24"></script>
		<script type="text/javascript" src="../common/js/mui.min.js?01_24"></script>
		<script type="text/javascript" src="../common/js/jquery-validate.js?01_24"></script>
		
		<script type="text/javascript" src="../common/js/fastclick.js?01_24"></script>
		<script type="text/javascript" src="../common/js/common.js?01_24"></script>
		<script type="text/javascript" src="../common/js/main.js?01_24"></script>
		<script type="text/javascript" src="../common/js/app.js?01_24"></script>
		<script type="text/javascript" src="../common/js/my_common.js?01_24"></script>
		<style>
			.error-box.red.center.mag-t-20 i,
			.error-box.red.center.mag-t-20 span {
				display: none;
			}
			
			.error-box.red.center.mag-t-20.error i,
			.error-box.red.center.mag-t-20.error span {
				display: inline-block;
			}
			
			.inp {
				text-align: left;
				padding-left: 20px;
			}
			.wrap_body{min-height: 100%;}
		</style>
	</head>

	<body style="background: #f5f4f4;">
		<header class="pr bg-red9 fff f-20 pad-t-10 pad-b-10 pad-l-10 pad-r-10">
			<div class="pa back">
				<a href="javascript:back();"></a>
			</div>
			<div class="center" data-l="1385"></div>
		</header>
		<div id="app" class="wrap_body change_password" v-cloak>
			<div class="text">
				<div @click="input_fun" class="item">
					<div class="bank5 bg-grayF5"></div>
					<div class="p fiex pad-l-10 pad-r-10 bg-fff">
						<div>{{b_lg['1020']}}</div>
						<div class="fiex1"><input data-valid="isNonEmpty" :data-error="b_lg['1127']" type="text" name="" id="" v-model="my_msg.nickname" :placeholder="b_lg['1127']" class="inp pad-t-25 pad-b-25 required" / ></div>
					</div>
				</div>
				<div class="bank5 bg-grayE9"></div>
				<!--错误提示-->
				<div class="error-box  red center  mag-t-20" style="height:10px;" id="errortip">
					<span class="mag-r-5 "></span>
				</div>
				<div class="mag-t-30">
					<button @click="form_btn" class="bg-red9 fff pad-l-60 pad-r-60 pad-t-15 pad-b-15 reg_btn">{{global_lange[1008]}}</button>
				</div>
			</div>
		</div>
		<script>
			function fun1() {
				setlange_obj(); //加载头部语言包
				//表单验证
				$('#app').validate({
					selectID: "#errortip" //指定弹出位置
				});
				var app = new Vue({
					el: '#app',
					data: {
						name: "",
						b_lg: global_lange, //语言包
						again_pas: "", //确认密码
						my_msg: ""
					},
					methods: {
						input_fun: function() {
							var el = event.currentTarget
							$(el).find("input").focus();
						},
						form_btn: function() {
							if($("#app").validate('submitValidate')) {
								common_ajax("1", {
									nickname: app.my_msg.nickname,
									headimgurl: app.my_msg.headimgurl
								}, "put_update_member_info", function(h) {
									if(h.status == "1") {
										setItem("my_msg", JSON.stringify(app.my_msg))
										if(isAPP) {
											var preUrl = plus.webview.currentWebview().opener();
											preUrl.evalJS('refresh()');
											var preUrl2 = plus.webview.currentWebview().opener().opener();
											preUrl2.evalJS('refresh()');
										}
										setTimeout(function() {
											back()
										}, 400)
									} else {
										mui.toast(h.msg);
									}
								})
							}
						}
					}
				})
				app.my_msg = JSON.parse(getItem("my_msg"));
			}
		</script>
	</body>

</html>
